<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;
use App\Admin\Controllers\DeviceController;
use App\Admin\Extensions\Tools\PrintButton;



Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/index', 'HomeController@index');
    //设备
    $router->resource('Device', DeviceController::class);
    //分类
    $router->resource('Category', CategoryController::class);
    //厂商
    $router->resource('Manufacturer', ManufacturerController::class);
    //位置地点
    $router->resource('Place', PlaceController::class);
    //配件
    $router->resource('Part', PartController::class);
     //配件分类
    $router->resource('PartCategory', PartCategoryController::class);
    //账号分类
    $router->resource('AccountCategory', AccountCategoryController::class);
    //用户管理
    $router->resource('AccountManagement', AccountManagementController::class);

    $router->get('auth/login', 'AuthController@getLogin');
    $router->post('auth/login', 'AuthController@postLogin');

    $router->get('device/print-labels', [DeviceController::class, 'printLabels'])->name('device.print-labels');


    

});
